Skip to content

fix(e2e): pin /nosql/new to fast anon hot-pool to stop e2e-prod timeout flake#180

Merged
mastermanas805 merged 1 commit into
mainfrom
fix/e2e-prod-nosql-forceanon
Jun 5, 2026
Merged

fix(e2e): pin /nosql/new to fast anon hot-pool to stop e2e-prod timeout flake#180
mastermanas805 merged 1 commit into
mainfrom
fix/e2e-prod-nosql-forceanon

Conversation

@mastermanas805

Copy link
Copy Markdown
Member

Problem

e2e-prod.yml was flaky: each run, a different AUTHED DEDICATED-backing-DB provision timed out at the per-test limit (`apiRequestContext.fetch: Request context disposed`). Observed: run 26999447344 green; 27000380873 failed on `/nosql/new`; an earlier run failed on `/vector/new`.

Root cause: authed provisioning of a DEDICATED backing DB (postgres `/db/new`, pgvector `/vector/new`, mongo `/nosql/new`) is slow on prod (>90s cold). Prior PRs pinned db (#178), queue (#177), and vector (#179) to the fast anon hot-pool. nosql was the last dedicated one still on the slow authed path.

Fix (systemic, one PR)

Pin every dedicated-backing-DB service — db, vector, nosql — to the fast anon hot-pool (`forceAnon`) so NONE can hit the slow authed-dedicated-provision timeout.

service path backing DB? provision path why
db `/db/new` (smoke spec) DEDICATED Postgres anon (forceAnon) authed cold-provision > 90s
vector `/vector/new` DEDICATED pgvector Postgres anon (forceAnon) same slow dedicated provision
nosql `/nosql/new` DEDICATED MongoDB anon (forceAnon) authed cold-provision > 90s (run 27000380873) — this PR
queue `/queue/new` none (NATS) anon (forceAnon) authed isolated-NATS HANGS on prod (P1 NKeys gap)
cache `/cache/new` none (Redis) authed-minted fast; keeps authed/minted-account + authed-reap coverage
storage `/storage/new` none (DO Spaces) authed-minted fast; keeps authed coverage
webhook `/webhook/new` none (Redis) authed-minted fast; keeps authed coverage

The fast services (cache/storage/webhook) + the auth specs + the claim flow + the minted-account lifecycle keep exercising the on-the-fly minted account, so "test accounts on the fly" coverage is retained.

Audited every live spec: the only other authed calls are `/cache/new` (no dedicated DB) and `/deploy/new` (202-accepted async contract, doesn't block on a dedicated-DB build). No other authed dedicated-DB provision remains.

Secondary guard: per-test timeout 90s → 120s in `playwright.live.config.ts` (the forceAnon pinning is the primary fix).

Verification

  • `npm run gate` green (tsc + build + prerender + vitest: 80 files, 1115 passed).
  • Will trigger `e2e-prod.yml` twice consecutively post-merge and confirm both runs `conclusion=success`.

🤖 Generated with Claude Code

…ut flake

nosql was the LAST dedicated-backing-DB service still on the slow authed
(minted-pro) provision path. The authed /nosql/new path provisions a DEDICATED
MongoDB per team — cold-provision > 90s on prod — which timed out the LIVE suite
at the per-test limit (flaky run 27000380873 failed on /nosql/new; an earlier
run failed on /vector/new). Prior PRs pinned db (#178) + queue (#177) + vector
(#179) to the fast anon hot-pool; this completes the set.

Systemic fix: EVERY service whose authed path provisions a dedicated backing DB
(db/vector/nosql) now uses forceAnon (anon hot-pool, TTL-reaped), so none can hit
the slow authed-dedicated-provision timeout. The fast, no-dedicated-DB services
(cache/storage/webhook) stay on the authed/minted-account + authed-reap path, and
the auth specs + claim flow + minted-account lifecycle keep exercising the
on-the-fly minted account — "test accounts on the fly" coverage is retained.

Adds a per-service path table (dedicated-DB? + fast-authed vs anon-hot-pool + why)
to live-anon-provision.spec.ts and syncs the cohort.ts/smoke-spec comments.

Secondary guard: bump playwright.live.config.ts per-test timeout 90s → 120s for
extra cold-hot-pool/network headroom (the forceAnon pinning is the primary fix).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@mastermanas805
mastermanas805 enabled auto-merge (squash) June 5, 2026 07:07
@github-actions

github-actions Bot commented Jun 5, 2026

Copy link
Copy Markdown

size-limit report 📦

Path Size
dist/assets/index-902QtfQT.js 161.98 KB (0%)
dist/assets/index-BsJUZYRr.css 6.13 KB (0%)

@mastermanas805
mastermanas805 merged commit e3645e0 into main Jun 5, 2026
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant